<%@ page pageEncoding="utf-8"%>
<html>
  <head>
    <link rel="stylesheet" type="text/css" href="allpage.css" >
    <script type="text/javascript" >
    	window.onload = function(){
    		document.getElementById("btn1").disabled = true;
    	}
    	
    	function check(){
    			var username = document.getElementById("username");
    			var password = document.getElementById("password");
    			var btn1 = document.getElementById("btn1");
	   			if(username.value != "" && password.value != "")
	   			{
	   				btn1.disabled = false;
	   			}else{
	   				btn1.disabled = true;
	   			}
   			}
    </script>
   
    <title>宠物诊所</title>
  </head>
  
  <body>
  <div class="background">
  	<div class="titlediv">
    	<h1 align="center">宠物诊所应用</h1>
    	<div>
		<%
			String msg = (String)session.getAttribute("msg");
			if(msg != null){
				out.println(msg);
				session.removeAttribute("msg");
			}
		 %>
	</div>
   	</div>
	
	<div class="contentDiv">
	  	<form action="servlet/LoginServlet" method="get">
		<table align="center">
	  		<tr>
	  			<td>用户名：</td>
	  		    <td><input id="username" type="text" name="username" onkeyup = "check()"/></td>
	  		</tr>
	  		<tr>
	  			<td>口令：</td>
	  			<td><input id="password" type="password" name="password" onkeyup = "check()"/></td>
	  		</tr>
	  		<tr>
	  			<td>
	  				<input id="btn1" type="submit" value="登陆"/>
	  			</td>
	  			<td>
	  				<input type="reset" value="重置" onclick=""/>
	  			</td>
	  		</tr>
	  	</table>
	  	</form>
  	</div>
  </div>
  </body>
</html>
